package com.dt76.smallloanbackendservice.controller.xm;

import com.dt76.smallloanbackendservice.pojo.afterloan.RepaymentInfo;
import com.dt76.smallloanbackendservice.pojo.xm.FcCheckState;
import com.dt76.smallloanbackendservice.service.xm.DashboardService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/xm")
public class DashboardController {

    @Resource
    private DashboardService dashboardService;

    @RequestMapping("/qryBorrowCount")
    @ResponseBody
    public int qryBorrowCount() {
        return dashboardService.qryBorrowCount();
    }

    @RequestMapping("/qryBorrowMoney")
    @ResponseBody
    public List<FcCheckState> qryBorrowMoney() {
        return dashboardService.qryBorrowMoney();
    }

    @RequestMapping("/qryLoanMoney")
    @ResponseBody
    public List<RepaymentInfo> qryLoanMoney() {
        return dashboardService.qryLoanMoney();
    }

    @RequestMapping("/qrySecondCount")
    @ResponseBody
    public int qrySecondCount() {
        return dashboardService.qrySecondCount();
    }

    @RequestMapping("/qryLaterCount")
    @ResponseBody
    public int qryLaterCount() {
        return dashboardService.qryLaterCount();
    }

    @RequestMapping("/qryLendCount")
    @ResponseBody
    public int qryLendCount() {
        return dashboardService.qryLendCount();
    }

    @RequestMapping("/qryOverCount")
    @ResponseBody
    public int qryOverCount() {
        return dashboardService.qryOverCount();
    }

}
